import request from '@/utils/processRequest';

// 定额发票识别
export function getQuotaInvoice(data) {
  return request({
    url: '/baiDuOCR/quotaInvoice',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}
// 增值税发票识别
export function getVatInvoice(data) {
  return request({
    url: '/baiDuOCR/vatInvoice',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}
// 查询发票配置
export function findByInvoice(params) {
  return request({
    url: '/invoice/findByTableId',
    method: 'get',
    params
  });
}

// 上传发票
export function uploadInvoice(data) {
  return request({
    url: '/invoice/upload',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}

// 校验发票是否已经存在
export function ExistInvoice(data) {
  return request({
    url: '/invoice/checkInvoiceExist',
    method: 'POST',
    data
  });
}

// 查询发票信息
export function findInvoiceInfo(data) {
  return request({
    url: '/invoice/findInvoiceInfo',
    method: 'POST',
    data
  });
}


//删除发票信息
export function deleteInvoiceInfo(params) {
  return request({
    url: '/invoice/deleteInvoiceInfo',
    method: 'get',
    params
  });
}